import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { MapSDominionServiceHelper } from "./MapSDominionServiceHelper";
import { DominionId } from "./DominionId";
type int = number;
//class SDominionBattleInfo
    
    export  class SDominionBattleInfo extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new SDominionBattleInfo();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            this.mainActId.__write(arg1);
            this.mainDefId.__write(arg1);
            arg1.writeInt(this.mainActNum);
            arg1.writeInt(this.mainDefNum);
            MapSDominionServiceHelper.write(arg1, this.assistActIds);
            MapSDominionServiceHelper.write(arg1, this.assistDefIds);
            arg1.writeInt(this.match);
            arg1.writeInt(this.cityId);
            arg1.writeInt(this.outcome);
            arg1.writeDate(this.startDate);
            arg1.writeDate(this.endDate);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.mainActId = new DominionId();
            this.mainActId.__read(arg1);
            this.mainDefId = new DominionId();
            this.mainDefId.__read(arg1);
            this.mainActNum = arg1.readInt();
            this.mainDefNum = arg1.readInt();
            this.assistActIds = MapSDominionServiceHelper.read(arg1);
            this.assistDefIds = MapSDominionServiceHelper.read(arg1);
            this.match = arg1.readInt();
            this.cityId = arg1.readInt();
            this.outcome = arg1.readInt();
            this.startDate = arg1.readDate();
            this.endDate = arg1.readDate();
            return;
        }

        public /* const */_type: int=2056;

        public /* var */mainActId: DominionId;

        public /* var */mainDefId: DominionId;

        public /* var */mainActNum: int;

        public /* var */mainDefNum: int;

        public /* var */assistActIds: Map<any, any> /* flash.utils.Dictionary */;

        public /* var */assistDefIds: Map<any, any> /* flash.utils.Dictionary */;

        public /* var */match: int;

        public /* var */cityId: int;

        public /* var */outcome: int;

        public /* var */startDate: Date;

        public /* var */endDate: Date;

        public static /* var */_regist: SDominionBattleInfo;
    }

            SDominionBattleInfo._regist = new SDominionBattleInfo(true);
        